type ToolEnum = {
  pid: number;
  name: string;
  child: {
    id: number;
    name: string;
    icon: string;
    toolType: string;
  }[];
}[];

type ControlEnum = {
  id: number;
  line: boolean;
  type: string;
  describe: string; // 功能描述
  componentList: string[]; // 应用于所在组件的名称
}[];

// 定义绘制工具数据
const toolList: ToolEnum = [
  {
    pid: 1,
    name: "位置点及选取工具",
    child: [
      {
        id: 1,
        name: "绘制地图节点",
        icon: "toolIcon",
        toolType: "node",
      },
    ],
  },
  {
    pid: 2,
    name: "路径及功能区",
    child: [
      {
        id: 1,
        name: "绘制单行直线",
        icon: "toolIcon",
        toolType: "lineMode1",
      },
      {
        id: 4,
        name: "绘制双行直线",
        icon: "toolIcon",
        toolType: "lineMode2",
      },
      // {
      //   id: 2,
      //   name: "绘制贝塞尔曲线(b)",
      //   icon: "toolIcon",
      //   toolType: "bezier",
      // },
      {
        id: 3,
        name: "绘制功能区(r)",
        icon: "toolIcon",
        toolType: "area",
      },
    ],
  },
  {
    pid: 3,
    name: "建筑",
    child: [
      {
        id: 1,
        name: "绘制墙(w)",
        icon: "toolIcon",
        toolType: "wall",
      },
      {
        id: 2,
        name: "绘制门(d)",
        icon: "toolIcon",
        toolType: "door",
      },
      {
        id: 3,
        name: "绘制柱子(p)",
        icon: "toolIcon",
        toolType: "column",
      },
    ],
  },
  {
    pid: 4,
    name: "其他",
    child: [
      {
        id: 1,
        name: "橡皮擦",
        icon: "toolIcon",
        toolType: "eraser",
      },
    ],
  },
];

// 图形编辑页定义的工具
const controlDrawer: ControlEnum = [
  {
    id: 1,
    line: true,
    componentList: ["mapArea", "drawingBoard"],
    type: "gesture",
    describe: "选取元素",
  },
  {
    id: 16,
    line: true,
    componentList: ["drawingBoard"],
    type: "connect",
    describe: "连接单行线",
  },
  {
    id: 19,
    line: true,
    componentList: ["drawingBoard"],
    type: "connect2",
    describe: "连接双行线",
  },
  {
    id: 2,
    line: true,
    componentList: ["mapArea", "drawingBoard"],
    type: "enabled",
    describe: "拖拽地图",
  },
  {
    id: 3,
    line: false,
    componentList: ["mapArea", "drawingBoard"],
    type: "zoomIn",
    describe: "放大地图",
  },
  {
    id: 4,
    line: false,
    componentList: ["mapArea", "drawingBoard"],
    type: "zoomOut",
    describe: "缩小地图",
  },
  {
    id: 5,
    line: false,
    componentList: ["mapArea", "drawingBoard"],
    type: "prompt",
    describe: "显示地图信息",
  },
  {
    id: 6,
    line: false,
    componentList: ["mapArea", "drawingBoard"],
    type: "rotateLeft",
    describe: "左旋转地图",
  },
  {
    id: 7,
    line: false,
    componentList: ["mapArea", "drawingBoard"],
    type: "rotateRight",
    describe: "右旋转地图",
  },
  {
    id: 8,
    line: false,
    componentList: ["mapArea", "drawingBoard"],
    type: "positioning",
    describe: "重定位地图",
  },
  // {
  //   id: 10,
  //   line: false,
  //   componentList: ['drawingBoard'],
  //   type: "revoke",
  // },
  // {
  //   id: 11,
  //   componentList: ['drawingBoard'],
  //   line: false,
  //   type: "restore",
  // },
  {
    id: 12,
    line: false,
    componentList: ["drawingBoard"],
    type: "alignLeft",
    describe: "左对齐元素",
  },
  {
    id: 13,
    line: false,
    componentList: ["drawingBoard"],
    type: "alignRight",
    describe: "右对齐元素",
  },
  {
    id: 14,
    line: false,
    componentList: ["drawingBoard"],
    type: "alignTop",
    describe: "上对齐元素",
  },
  {
    id: 15,
    line: false,
    componentList: ["drawingBoard"],
    type: "alignBottom",
    describe: "下对齐元素",
  },

  {
    id: 17,
    line: false,
    componentList: ["drawingBoard"],
    type: "alignAngleX",
    describe: "X方向斜对齐元素",
  },
  {
    id: 18,
    line: false,
    componentList: ["drawingBoard"],
    type: "alignAngleY",
    describe: "Y方向斜对齐元素",
  },
];

// 自定义地图筛选
const nodeEdgeFiltering = [
  {
    value: 1,
    label: "节点",
  },
  {
    value: 2,
    label: "边",
  },
];

export { toolList, controlDrawer, nodeEdgeFiltering };
